-content_for :modal_title do
  -if f.object.new_record?
    Create a new #{f.object.meta_kind}
  -else
    Edit #{f.object.meta_kind}

-if !f.object.new_record?
  -content_for :modal_delete_path, delete_flow_system_path(f.object)

=f.hidden_field(:is_biz_process)

.row-fluid
  -#.span3
    =f.label 'Type'
    -if f.object.new_record?
      %select.span12{ :name => 'system[is_biz_process]' }
        %option{ :value => '0', :selected => f.object.is_biz_process || 'selected' } System
        %option{ :value => '1', :selected => f.object.is_biz_process && 'selected' } Process
      =error_messages_inline(f, :is_biz_process)
    -else
      .item
        =f.object.meta_kind.to_s.titleize
  =wrapped_text_field f, :span9, :title, :placeholder => 'Enter title', :label_name => 'Title <span class="required">*</span>'.html_safe  
  =wrapped_text_field f, :span3, :slug, :label_name => 'Code (autofill)', :placeholder => "#{f.object.default_slug_prefix}-XXXX"

.row-fluid
  =wrapped_text_area f, :span6, :description, :class => 'double wysihtml5', :wrapper_div_class => 'wysiwyg-area', :placeholder => 'Enter description here'
  =wrapped_text_area f, :span6, :notes, :class => 'double wysihtml5', :wrapper_div_class => 'wysiwyg-area', :placeholder => 'Enter notes here'

.row-fluid
  =wrapped_date_field f, :span3, :start_date, :class => 'date', :label_name => 'Effective Date', :placeholder => 'MM/DD/YYYY'
  =wrapped_date_field f, :span3, :stop_date, :class => 'date', :label_name => 'Stop Date', :placeholder => 'MM/DD/YYYY'
  =wrapped_select f, :span3, :network_zone_id, Option.options_for(:network_zone).map { |o| [o.title, o.id] }, :selected => (f.object.respond_to?(:network_zone_id) ? f.object.network_zone_id : nil), :include_blank => true, :label_name => 'Network Zone'


.row-fluid
  =wrapped_text_field f, :span12, :url, :label_name => 'Direct URL (optional)', :placeholder => 'http://www.example.com/'

=render :partial => "shared/wysihtml5"
